package interview.offer;

/**
 * @author fangbin
 * @desc
 * @date 2020/5/13 7:13
 */
public class ExceptionLoopTest {

    public static void main(String[] args) {
       /* try {
        for(int i=0;i<10;i++){
            System.out.println("i="+i);
                if (i == 5) {
                    throw new ArrayIndexOutOfBoundsException();
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }*/

        int a = 10;
        System.out.println("do something.......");
        try {
            throw new NullPointerException("exception.......");
        }catch (Exception e){
            e.printStackTrace();
        }

        System.out.println("after exception ");
        for(int i=0;i<10;i++){
            System.out.println("i="+i);
        }

    }
}
